Skip to content

provide tools and prompts to clone child element if the child already has a parent#186

Open
rl-utility-man wants to merge 8 commits intopython-visualization:mainfrom
rl-utility-man:parent-overwrite-on-reuse-fix
Open

provide tools and prompts to clone child element if the child already has a parent#186
rl-utility-man wants to merge 8 commits intopython-visualization:mainfrom
rl-utility-man:parent-overwrite-on-reuse-fix

Conversation

@rl-utility-man
Copy link
Copy Markdown

@rl-utility-man rl-utility-man commented Jan 21, 2025

I reported Folium issue 1885, which occurs because passing a single element to the add_child routine twice overwrites the first value of the parent variable inside the element object. @Conengmo suggested adding a clone routine to address this problem, which I have done. Applying add_child(exampleChild) always overwrites the value of the exampleChild.parent variable, which will lead to undesirable behavior, so I changed add_child to emit a warning that recommends submitting a clone instead when users try to do that.

Thanks for your help. Looking forward to discussing the best way forward.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants